home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / infosrvr / doc / url7a.txt < prev    next >
Text File  |  1993-10-17  |  50KB  |  1,220 lines

  1. Uniform Resource Locators (URL)                 Tim Berners-Lee
  2. Internet Draft                                             CERN
  3. Expires May 1994                                   October 1993
  4.  
  5.  
  6.                   Uniform Resource Locators (URL)
  7.                 
  8.              A Unifying Syntax for the Expression of
  9.           Names and addresses of Objects on the Network
  10.  
  11.  
  12. Status of this memo
  13.  
  14.    This document is an Internet Draft. Internet Drafts are working
  15.    documents of the Internet Engineering Task Force (IETF), its Areas,
  16.    and its Working Groups.  Note that other groups may also distribute
  17.    working documents as Internet Drafts.
  18.    
  19.    Internet Drafts are working documents valid for a maximum of six
  20.    months. Internet Drafts may be updated, replaced, or obsoleted by
  21.    other documents at any time.  It is not appropriate to use Internet
  22.    Drafts as reference material or to cite them other than as a
  23.    "working draft" or "work in progress".
  24.    
  25.    Distribution of this document is unlimited.  Please send comments
  26.    to the author as timbl@info.cern.ch. or to the discussion list
  27.    ietf-url@merit.edu.
  28.    
  29. Abstract
  30.  
  31.    Many protocols and systems for document search and retrieval are
  32.    currently in use, and many more protocols or refinements of
  33.    existing protocols are to be expected in a field whose expansion is
  34.    explosive.
  35.    
  36.    These systems are aiming to achieve global search and readership of
  37.    documents across differing computing platforms, and despite a
  38.    plethora of protocols and data formats.   As protocols evolve,
  39.    gateways can allow global access to remain possible. As data
  40.    formats evolve, format conversion programs can preserve global
  41.    access. There is one area, however, in which it is impractical to
  42.    make conversions, and that is in the names and addresses used to
  43.    identify objects.  This is because names and addresses of objects
  44.    are passed on in so many ways, from the backs of envelopes to
  45.    hypertext objects, and may have a long life.
  46.    
  47.    This paper discusses the requirements on a universal syntax which
  48.    can be used to refer to objects available using existing protocols,
  49.    and may be extended with technology.  It makes a recommendation for
  50.    a generic syntax, and for specific forms for "Uniform Resource
  51.    Locators" (URLs)of objects accessible using existing Internet
  52.    protocols.
  53.    
  54.  
  55.  
  56.  
  57. Berners-Lee                                                          1
  58.  
  59.    The syntax has been in widespread use by World-Wide Web software
  60.    since 1990.
  61.    
  62. Terms
  63.  
  64.    The objects on the network which are to be named and addressed
  65.    include typically objects which can be retrieved, and objects which
  66.    can be searched.   There is a great variety of other objects which
  67.    may support other operations.  We imply nothing about the contents
  68.    of objects in this document. Whereas human-readable documents are
  69.    currently the center of interest of the field, we envisage all
  70.    aspects discussed in this paper applying to generalised objects
  71.    when systems to handle them become available. The "object" is the
  72.    unit of reference and need not correspond to any unit of storage.
  73.    We refer to objects which can be searched as "indexes".  We
  74.    emphasise that this is the abstract view of the client, and these
  75.    objects need not correspond to physical files on computers. We
  76.    refer to the person who does the retrieval or searching as the
  77.    user.
  78.    
  79.    Within this document, we use the terms "name" very generally for a
  80.    string of characters describing an object,  whatever its
  81.    combination of properties mentioned below.  (The term usually has a
  82.    narrower meaning but we needed some term for the universal set.).
  83.    This uniform syntax applied to a generic name is known as a Uiform
  84.    Resource Identifier (URI). The term "address" is reserved for an
  85.    string which specifies a more or less physical location.  The term
  86.    "locator" refers to a URL as here defined.  URIs which have a
  87.    greater persistence than URLs are referred to as URNs.
  88.    
  89. Requirements
  90.  
  91.    This section discusses requirements for URLs, as an introduction of
  92.    and background for the Recommendations section.
  93.    
  94.   USES OF NAMES AND ADDRESSES
  95.   
  96.    A name allows a user, with the help of a "client" program, to
  97.    retrieve or operate on objects via a "server" program.  A name may
  98.    be passed for example:
  99.    
  100.       In communication of any form between two people, to refer to a
  101.       document, or part of a document;
  102.       
  103.       As part of the description of a link associated with a hypertext
  104.       document;
  105.       
  106.       As part of the result of searching an index.
  107.       
  108.    Some typical requirements on a name which are met to a varying
  109.    degree by various schemes are for example that the name is
  110.    
  111.   Persistent              A given name will remain valid as long as it
  112.  
  113.  
  114.  
  115. Berners-Lee                                                          2
  116.  
  117.                          is needed;
  118.                          
  119.   Extensible              A given naming syntax will remain valid
  120.                          through the introduction of new protocols and
  121.                          directory technologies;
  122.                          
  123.   Resolvable              A name will contain enough information to
  124.                          allow the document or index to which it
  125.                          refers to be accessed, perhaps via resolution
  126.                          into an intermediate, more physical, name.
  127.                          
  128.   Unique                  Each object can only have one such name.
  129.                          The fact that two such names are different
  130.                          implies that the objects to which they refer
  131.                          are different (in some way).
  132.                          
  133.   Unambiguous             The fact that two names are identical
  134.                          implies that the objects named are the same
  135.                          (in some way).
  136.                          
  137.    The syntax discussed is the syntax of one name, be it a lasting
  138.    name or a physical address.  When a directory server or hypertext
  139.    link contains a set of alternative names, then that is beyond the
  140.    scope of this syntax.  Similarly, a syntax for describing a
  141.    compound object is outside the scope of this syntax.  The specific
  142.    locator name spaces (defined under the umbrella of the general
  143.    syntax) each meet the requirements above to a greater or lesser
  144.    extent.
  145.    
  146.   CURRENT PRACTICE
  147.   
  148.    Current protocols use many different standards for names. For some
  149.    protocols, such as ISO-10163 Search and Retrieve protocol[16], the
  150.    names returned in a search are only valid during the session. For
  151.    others, such as FTP[9], they are lasting names which may be used
  152.    for object retrieval at a later time.  Typically, however, they are
  153.    not long-lasting names which are independent of the location of the
  154.    object. Such names may be provided using directory servers such as
  155.    x.500. They will refer to the registration, however formal or
  156.    informal, of a object with a particular organisation or person.
  157.    Both hypertext and  manual references rely on long- lasting names.
  158.    Current names are basically location specifiers (addresses). These
  159.    may be known as Uniform Resource Locators (URLs). They give the
  160.    necessary parts of an address for a reader to access an information
  161.    provider using the given protocol, and ask for the object required.
  162.    Examples of names used by various protocols include
  163.    
  164.     File Transfer Protocol (Postel 1985):
  165.     
  166.       Host name or IP-address
  167.       
  168.       [TCP port]
  169.       
  170.  
  171.  
  172.  
  173. Berners-Lee                                                          3
  174.  
  175.       [user name, password]
  176.       
  177.       Filename
  178.       
  179.    W.A.I.S. (Kahle 1990)
  180.    
  181.       Host name or IP-address
  182.       
  183.       [TCP port]
  184.       
  185.       local document id
  186.       
  187.     Gopher (Alberti 1991)
  188.     
  189.       Host name or IP-address
  190.       
  191.       [TCP port]
  192.       
  193.       database name
  194.       
  195.       selector string
  196.       
  197.     HTTP (Berners-Lee 1991)
  198.     
  199.     Host name or IP-address
  200.     
  201.     [TCP port]
  202.     
  203.     local object id
  204.     
  205.     NNTP (Kantor 1986) group Group name
  206.     
  207.       NNTP article
  208.       
  209.       Host name
  210.       
  211.       unique message identifier
  212.       
  213.     Prospero links (Neuman 1992)
  214.     
  215.    Host name or IP address
  216.    
  217.       [UDP port]
  218.       
  219.        Host specific object name
  220.       
  221.       [version]
  222.       
  223.       [identifier]*
  224.       
  225.     x.500 distinguished name
  226.     
  227.       Country
  228.  
  229.  
  230.  
  231. Berners-Lee                                                          4
  232.  
  233.       Organisation
  234.       
  235.       Organisational unit
  236.       
  237.       Person
  238.       
  239.       Local object identifier
  240.       
  241.    Other systems with their own naming schemes include BITNET
  242.    "LISTSERV" application, FTAM file retrieval, SQLnetTM remote
  243.    database search, proprietary  distributed file systems, etc.
  244.    Conventional syntax for writing these addresses involve various
  245.    forms of punctuation to separate these parts.  This sometimes,  but
  246.    not always, allows the naming scheme to be deduced from the
  247.    punctuation. For example, a name of the form
  248.    xxx.yyy.zz.edu:/pub.aa.bb.cc  often implies anonymous FTP access.
  249.    However, there is no well-defined algorithm for parsing an
  250.    arbitrary name, as there is no common syntax.
  251.    
  252.   EXPANDABILITY
  253.   
  254.    There will necessarily be a phase during which lasting names will
  255.    become more  common, as the deployment of directory services
  256.    increases to the point where  every user has direct or indirect
  257.    access to one.  Even then, however, one can envisage more than one
  258.    competing directory system, and cases in which physical  names are
  259.    still required.  A directory service takes a lasting name and
  260.    reduces it  to a physical address (or set of addresses) which,
  261.    though less useful for lasting reference, is the only way to
  262.    actually retrieve the object. An addressing syntax is required
  263.    which will be able to encompass existing  physical address spaces,
  264.    and be extendible to any future protocols.  This  requires that it
  265.    contain an identifier for the protocol in use. The format of the
  266.    rest  of the address will necessarily depend to a certain extent on
  267.    the protocol.
  268.    
  269.   RELEVANCE
  270.   
  271.    The life of a name is limited by any information contained within
  272.    it which may  become prematurely invalid. It is therefore necessary
  273.    to limit the contents of a name to the information required for the
  274.    operations above.  Other extraneous information about the object
  275.    (its size, data format, authorisation details, etc.) may in general
  276.    change with time and should not be part of the name.  One might
  277.    expect such information to be part of the "header" of a object, and
  278.    for protocols to allow the header information to be retrieved
  279.    independently of the objects themselves.  Any physical address may
  280.    be subject to change with time: hence we encourage the move to
  281.    lasting names and directory services.
  282.    
  283.   UNIQUENESS
  284.   
  285.    Clearly one requires unambiguous names in the sense that one name
  286.  
  287.  
  288.  
  289. Berners-Lee                                                          5
  290.  
  291.    should refer to only one logical object. This is the case with all
  292.    the addressing schemes in use, whether they are directory systems
  293.    or physical addresses. (The internet addresses all rely on the
  294.    domain name (Mockapetris 1987) of the host to achieve this).
  295.    However, given that names can be translated, many apparently
  296.    different names  may lead to the same object. Any object may
  297.    therefore be referred to by many  names. One needs to be able to
  298.    know whether two objects, retrieved through  different paths, are
  299.    in fact the same object.  It is suggested that each object have a
  300.    unique "official" name. This name could be stored in the object in
  301.    some representations, or stored in a database  accessible to the
  302.    server, for example.  Any references within that object should be
  303.    parsed in the context of the official name.  In the presence of a
  304.    directory service, the official name will normally be the
  305.    registered name of the object. However, a name in any scheme will
  306.    do, so long as it is completely specified. On systems which do not
  307.    allow the name to be stored (such as anonymous FTP archive sites),
  308.    a possible ambiguity will always exist as to whether two similarly
  309.    named objects are in fact the same.  Note that Internet newsgroup
  310.    names are unique world-wide, and news articles carry a unique
  311.    message id. In most other cases, however, there is no guarantee
  312.    that dereferencing a URL will work, or that if it does the object
  313.    it refers to will in fact be the object intended.  URLs such as FTP
  314.    addresses are transient in that files may be moved and even
  315.    replaced by different files of the same name.  This disorganisation
  316.    may be limited by good server management, but a naming scheme which
  317.    is independent also of internet host name is obviously preferable.
  318.    
  319.   READABILITY BY PEOPLE
  320.   
  321.    This requirement has been put forward by several people (Clifford
  322.    Lynch, Douglas Engelbart among others), and disputed by others.
  323.    The author's view is that it will be a while before technology and
  324.    standardisation have reached the point at which names and addresses
  325.    will be hidden from human beings. As long as they must be written
  326.    on the backs of envelopes and "cut and pasted" between workstation
  327.    windows, there is a strong need for names to be
  328.    
  329.       Short
  330.       
  331.        Composed of printable (preferably non-white) characters
  332.       
  333.       To a certain extent, understadable by a human being.
  334.       
  335.   STRUCTURE OF NAMES AND ADDRESSES
  336.   
  337.    A physical address is required in order for:
  338.    
  339.       The user's program to contact the server;
  340.       
  341.       The server to perform the operation (e.g. search and index,
  342.       retrieve a object,  or look up the name) and return a result;
  343.       
  344.  
  345.  
  346.  
  347. Berners-Lee                                                          6
  348.  
  349.       The user's program to locate an individual position or element
  350.       within a returned object.
  351.       
  352.    This suggests that a name be structured, such that the parts
  353.    necessary for these  three operations be separate and only used by
  354.    those system elements which need  those parts. This corresponds to
  355.    the basic principle of information hiding.  In fact,  four parts
  356.    are necessary, including the indicator of the naming scheme to be
  357.    used:
  358.    
  359.       The naming scheme: a registered identifier for the protocol.
  360.       
  361.       The name of a suitable server. The format of this part must be
  362.       well defined. It will depend on the lower-layer protocols in
  363.       use.  Systems which use widely distributed information, such as
  364.       x.500 and NNTP, do not need this part as each client generally
  365.       contacts his nearest server (or a particular server).
  366.       
  367.       Information to be passed to the server. This may be private to
  368.       the server, as all names may be generated and used by the same
  369.       server. This part of the name should be opaque to the client.
  370.       
  371.       Information to be used by the application once the object has
  372.       been retrieved. This part is private to the application (or,
  373.       more strictly, the data format) and so cannot be defined here.
  374.       
  375.    Both lasting names and physical addresses often share a
  376.    hierarchical structure. This follows often from the organisation of
  377.    the system. From the naming point of view, it has the advantage
  378.    that a reference in one object to another object need not include
  379.    that part of the structure which is common to both names.
  380.    
  381.   CHOICES
  382.   
  383.    The requirements above leave little room for choice save for the
  384.    order and punctuation of the elements of an address.  It is only
  385.    reasonable for the order of writing of the parts to be consistently
  386.    from left to right (or right to left) with increasing specificity.
  387.    Punctuation schemes fall into two categories (Huitema 1991): tagged
  388.    schemes in which field are given names, and fields which use
  389.    special characters and field order. The latter tend to be more
  390.    compact schemes.
  391.    
  392.  
  393.         protocol: aftp host: xxx.yyy.edu path:
  394.  
  395.         /pub/doc/README
  396.  
  397.         PR=aftp; H=xx.yy.edu; PA=/pub/doc/README;
  398.  
  399.         PR:aftp/xx.yy.edu/pub/doc/README
  400.  
  401.         /aftp/xx.yy.edu/pub/doc/README
  402.  
  403.  
  404.  
  405. Berners-Lee                                                          7
  406.  
  407.    Fig 1. Some alternative tagged and untagged representations
  408.    
  409.    The choice of special symbols for punctuation tends to be a matter
  410.    of taste. It is easier to read  addresses whose symbols correspond
  411.    to those of one's favourite operating system. A variety of symbols
  412.    is needed so that when a name is abbreviated it is possible to tell
  413.    which parts have been omitted.
  414.    
  415.    The  recommendation below uses special characters in order to
  416.    achieve a compact name, and uses where possible punctuation symbols
  417.    established in the internet or unix community.
  418.    
  419.    The choice of escape character for introducing representations of
  420.    non-allowed characters also tends to be a matter of taste. An ANSI
  421.    standard exists in the C language, using the back-slash character
  422.    "\". The use of this character on unix command lines, however, can
  423.    be a problem as it is interpreted by many shell programs, and would
  424.    have itself to be escaped.
  425.    
  426.    There is a conflict between the need to be able to represent many
  427.    characters including spaces within a URL directly, and the need to
  428.    be able to use a URL in environments which have limited character
  429.    sets or in which certain characters are prone to corruption.  This
  430.    conflict has been resolved by use of an hexadecimal escaping method
  431.    which may be applied to any characters forbidden in a given
  432.    context.  When URLs are moved between contexts, the set of
  433.    characters escaped may be enlarged or reduced unambiguously.
  434.    
  435.    The use of multiple white space characters is discouraged  in URLs
  436.    to be printed or sent by electronic mail.  This is because of the
  437.    frequent introduction of extraneous white space when lines are
  438.    wrapped by systems such as mail, or sheer necessity of narrow
  439.    column width, and because of the  inter-conversion of various forms
  440.    of white space which occurs during character code conversion and
  441.    the transfer of text between applications.
  442.    
  443. Recommendations
  444.  
  445.    This section describes the syntax for "Uniform Resource Locators"
  446.    (URLs): that is, basically physical addresses of objects which are
  447.    retrievable using protocols already deployed on the net.  The
  448.    generic syntax provides a framework for new schemes for names to be
  449.    resolved using as yet undefined protocols.
  450.    
  451.    The syntax is described in two parts. Firstly, we give the syntax
  452.    rules of a completely specified name; secondly, we give the rules
  453.    under which parts of the name may be omitted in a well-defined
  454.    context.
  455.    
  456.   FULL FORM
  457.   
  458.    A complete URL consists of a naming scheme specifier followed by a
  459.    string whose format is a function of the naming scheme. For
  460.  
  461.  
  462.  
  463. Berners-Lee                                                          8
  464.  
  465.    locators of information on the internet, a common syntax is used
  466.    for the  IP address part. A BNF description of the URL syntax is
  467.    given in an a later section. The components are as follows.
  468.    
  469.     Fragment-id
  470.     
  471.    This represents a part of, fragment of, or a sub-function within,
  472.    an object or object. Its syntax and semantics are defined by the
  473.    application responsible for the object, or the specification of the
  474.    content type of the object. The only definition here is of the
  475.    allowed characters by which it may be represented in a URL.
  476.    
  477.    The fragment-id follows the URL of the whole object from which it
  478.    is separated by a hash sign (#).  If the fragment-id is void, the
  479.    hash sign may be omitted: A void fragment-id with or without the
  480.    hash sign means that the URL refers to the whole object.
  481.    
  482.    While this hook is allowed for identification of fragments, the
  483.    question of addressing of parts of objects, or of the grouping of
  484.    objects and relationship between contined and containing objects,
  485.    is not addressed by this object.
  486.    
  487.    This object does not address the question of objects which are
  488.    different versions of a "living" object, nor of expressing the
  489.    relationships between different versions and the living object.
  490.    
  491.   SCHEME
  492.   
  493.    Within the URL of a object, the first element is the name of the
  494.    scheme, separated from the rest of the object by a colon. The rest
  495.    of the URL follows the colon in a format depending on the scheme.
  496.    
  497.     Internet protocol parts
  498.     
  499.    Those schemes which refer to internet protocols have a common
  500.    syntax for the rest of the object name. This starts with a double
  501.    slash "//" to indicate its presence, and continues until the
  502.    following slash "/".  Within that section are
  503.    
  504.   An optional user name,
  505.                           if this must be quoted to the server,
  506.                          followed by  a commercial at sign "@".  (Use
  507.                          of this field is discouraged. Provision of
  508.                          encoding a password after the user name,
  509.                          delimited by a colon, could  be made but
  510.                          obviously is only useful when the password is
  511.                          public, in  which case it should not be
  512.                          necessary, so that is also discouraged.)
  513.                          
  514.   The internet domain name
  515.                           of the host in RFC1037 format (or,
  516.                          optionally and less advisably, the IP address
  517.                          as a set of four decimal digits)
  518.  
  519.  
  520.  
  521. Berners-Lee                                                          9
  522.  
  523.   The port number,        if it is not the default number for the
  524.                          protocol, is given in decimal notation after
  525.                          a colon.
  526.                          
  527.   Path                    The rest of the locator is known as the
  528.                          "path". It may define details of how the
  529.                          client should communicate with the server,
  530.                          including information to be passed
  531.                          transparently to the server without any
  532.                          processing by the client.
  533.                          
  534.    The path is interpreted in a manner dependent on the protocol being
  535.    used. However, when it contains slashes, these must imply a
  536.    hierarchical structure.
  537.    
  538.   PARTIAL FORM
  539.   
  540.    In a certain limited set of cases, generally within a certain
  541.    application, it may be useful to pass only a section of the URL.
  542.    Within a object whose URL is well defined, the URL of another
  543.    object may be given in abbreviated form, where parts of the two
  544.    URLs are the same. This allows objects within a group to refer to
  545.    each other without requiring the space for a complete reference,
  546.    and it incidentally allows the group of objects  to be moved
  547.    without changing any references. This is not discussed in detail
  548.    here, it is only mentioned so that the characters required by the
  549.    technique be reserved for that purpose.  It must be emphasised that
  550.    when a reference is passed in anything other than a well controlled
  551.    context, the full form must always be used.
  552.    
  553.    The partial form relies on a property of the URL syntax that
  554.    certain characters ("/") and certain path elements ("..", ".") have
  555.    a significance reserved for representing a hierarchical space, and
  556.    must be recognised as such by both clients and servers.
  557.    
  558.    A partial form can be distinguished from a full form in that a full
  559.    form must have a colon and that colon must occur before any slash
  560.    characters.
  561.    
  562.    The rules for the use of a partial name are:
  563.    
  564.       If the scheme parts  are different, the whole absolute locator
  565.       must be given. Otherwise, the scheme is omitted, and:
  566.       
  567.       If the host and/or port parts are the different, the host, port
  568.       name and all the rest of the locator must be given.
  569.       
  570.       If the access and host parts are the same, then the path may be
  571.       given in absolute (fully qualified) or relative form. Within the
  572.       path:
  573.       
  574.       If a leading slash is present, the path is absolute. Otherwise,
  575.       a relative path is interpreted as follows:
  576.  
  577.  
  578.  
  579. Berners-Lee                                                          10
  580.  
  581.       The last part of the path of the context locator (anything
  582.       following the rightmost slash) is removed, and the given partial
  583.       URL appended in its place.
  584.       
  585.       Within the result,  all occurrences of "/xxx/.."  or "/." are
  586.       recursively removed, where xxx, ".." and "." are complete path
  587.       elements.
  588.       
  589.    Note:  If a path of the context locator end in slash, partial URLs
  590.    will be treated differently to their treatment with respect to the
  591.    same path without a slash.   Using a trailing slash on a directory
  592.    name is not therefore recommended.  The signifcance of a trailing
  593.    slash may be considered as that of the locator of a file with void
  594.    name within that  directory.
  595.    
  596.   ENCODING PROHIBITED CHARACTERS
  597.   
  598.    When a system uses a local addressing scheme, it is useful to
  599.    provide a mapping from local addresses into URLs so that references
  600.    to objects within the addressing scheme may be referred to
  601.    globally, and possibly accessed through gateway servers.
  602.    
  603.    Any mapping scheme may be defined provided it is unambiguous,
  604.    reversible, and provides valid URLs. It is recommended that where
  605.    hierarchical aspects to the local naming scheme exist, they be
  606.    mapped onto the hierarchical URL path syntax in order to allow the
  607.    partial form to be used.
  608.    
  609.    The following encoding method shall be used for mapping WAIS, FTP,
  610.    Prospero and Gopher addresses onto URLs. Where the local naming
  611.    scheme uses ASCII characters which are not allowed in the URL,
  612.    these may be represented in the URL by a percent sign "%" followed
  613.    by two hexadecimal digits (0-9, A-F) giving the ISO Latin 1 code
  614.    for that character.  Character codes other than those allowed by
  615.    the syntax shall not be used in a URL.
  616.    
  617.    The same encoding method may be used for encoding characters whose
  618.    use, although technically allowed in a URL, would be unwise due to
  619.    problems of corruption by imperfect gateways or misrepresentation
  620.    due to the use of variant character sets, or which would simply be
  621.    awkward in a given environment.  As a % sign always indicates an
  622.    encoded character, a URL may be made safer simply by encoding any
  623.    characters considered unsafe, while leaving already encoded
  624.    characters still encoded.
  625.    
  626.    (Note: If a new naming scheme is introduced which encodes binary
  627.    data as opposed to text, then a more compact encoding such as pure
  628.    hex or base 64 would be more appropriate.)
  629.    
  630.    The same considerations apply to mapping local fragment identifiers
  631.    onto the fragmentid part of a URL.
  632.    
  633. Specific Schemes
  634.  
  635.  
  636.  
  637. Berners-Lee                                                          11
  638.  
  639.    The mapping for some existing standard and experimental protocols
  640.    is outlined in the BNF syntax definition.  Notes on particular
  641.    protocols follow.
  642.    
  643.   HTTP
  644.   
  645.    The HTTP protocol specifies that the path is handled transparently
  646.    by those who handle URLs, except for the servers which dereference
  647.    them.   The path is passed by the client to the server with any
  648.    request, but is not otherwise understood by the client.  The
  649.    fragmentid part is not sent with the request.  The search part, if
  650.    present, is sent. Spaces in URLs should be escaped for transmission
  651.    in HTTP.
  652.    
  653.   FTP
  654.   
  655.    The ftp: prefix indicates a file which is to be picked up from the
  656.    file system of the given host. The FTP protocol is used. The port
  657.    number if given gives the port of the FTP server if not the FTP
  658.    default. (A client may in practice use local file access to
  659.    retrieve objects which are available though more efficient means
  660.    such as local file open or NFS mounting, where this is available
  661.    and equivalent).
  662.    
  663.     The syntax allows for the inclusion of a user name and even a
  664.    password for those systems which do not use the anonymous FTP
  665.    convention. The default, however, if no user or password is
  666.    supplied, will be to use that convention, viz. that the user name
  667.    is "anonymous" and the password the user's mail address.
  668.    
  669.    The adoption of a unix-style syntax involves the conversion into
  670.    non-unix local forms by either the client or server. Some non-unix
  671.    servers do this, but clients wishing to access sites which do not
  672.    have unix-style naming will need certain algorithms to enable
  673.    other file systems to be identified and treated.  Client software
  674.    may also have to be flexible in terms of the sequence of FTP
  675.    commands used with different varieties of server.  In view of a
  676.    tendency for file systems to look increasingly similar, it was felt
  677.    that the URL convention should not be weighed down by extra
  678.    mechanisms for identifying these cases.
  679.    
  680.    The data format of a file can only, in the general FTP case, be
  681.    deduced from the name, normally the suffix of the name. This is not
  682.    standardised. An alternative is for it to be transferred in
  683.    information outside the URL. The transfer mode (binary or text)
  684.    must in turn be deduced from the data format.  It is recommended
  685.    that conventions for suffixes of public archives be established,
  686.    but it outside the scope of this paper.
  687.    
  688.   NEWS
  689.   
  690.    The news locators refer to either news group names or article
  691.    message identifiers which must conform to the rules of RFC 850.  A
  692.  
  693.  
  694.  
  695. Berners-Lee                                                          12
  696.  
  697.    message identifier may be distinguished from a news group name by
  698.    the presence of the commercial at "@" character. These rules imply
  699.    that within an article, a reference to a news group or to another
  700.    article will be a valid URL (in the partial form).
  701.    
  702.    Note1:  Among URLs the news: URLs are anomalous in that they are
  703.    location-independent.  They are unsuitable as URN candidates
  704.    because the NNTP architecture relies on the expiry of articles and
  705.    therefore a small number of articles being available at any time.
  706.    When a news: URL is quoted, the assumption is that the reader will
  707.    fetch the arcticle or group from his or her local news host.  News
  708.    host names are NOT part of news URLs.
  709.    
  710.    Note 2: An outstanding problem is that the message identifier is
  711.    insufficient to allow the retrieval of an expired article, as no
  712.    algorithm exists for deriving an archive site and file name. The
  713.    addition of the date and news group set to the article's URL would
  714.    allow this if a directory existed of archive sites by news group.
  715.    Suggested subject of study in conjunction with NNTP WG.  Further
  716.    extension possible may be to allow the naming of subject threads as
  717.    addressable objects.
  718.    
  719.   WAIS
  720.   
  721.    The current WAIS implementation public domain requires that a
  722.    client know the "type" and length of a object prior to retrieval.
  723.    These values are returned along with the internal object identifier
  724.    in the search response. They have been encoded into the path part
  725.    of the URL in order to make the URL sufficient for the retrieval of
  726.    the object.  If  changes to WAIS specifications make the internal
  727.    id something which is sufficient for later retrieval then this will
  728.    not be necessary.  Within the WAIS world, names do not of course
  729.    not need to be prefixed by "wais:"  (by the partial form rules).
  730.    
  731.    The length not now being strictly necessary is kept for historical
  732.    reasons.
  733.    
  734.   PROSPERO
  735.   
  736.    The Prospero (Neuman, 1991) directory service is used to resolve
  737.    the URL yielding an access method for the object (which can then
  738.    itself be represented as a URL if translated). The host part
  739.    contains a host name or internet address.  The port part is
  740.    optional.  The path part contains a host specific object name, an
  741.    optional version number, and an optional list of attributes.  If
  742.    these latter fields are present thy are separated from the host
  743.    specific object name and from each other by the characters "%00"
  744.    (percent, zero, zero),  this being and escaped string terminator
  745.    (null).  If the optional list of attributes is provided, the
  746.    version number must be present, but may be the empty string (i.e.
  747.    the first attribute would be seperaed from the host specific name
  748.    by "%00%00"). External Prospero links are represented directly as
  749.    URLs of the underlying access method and are not represented as
  750.  
  751.  
  752.  
  753. Berners-Lee                                                          13
  754.  
  755.    Prospero URLs.
  756.    
  757.   GOPHER
  758.   
  759.    The first character of the URL path part (after the initial single
  760.    slash) is a single-character "type" field which is that used by the
  761.    Gopher protocol.  The rest of the path is the "selector string",
  762.    with disallowed characters encoded. Note that some selector strings
  763.    begin with a copy of the gopher type character, in which case that
  764.    character will occur twice consecutively in the URL. If the type
  765.    character and selector are omitted, the type defaults to "1".
  766.    Gopher links which refer to non-Gopher protocols are represented
  767.    directly as URLs of the underlying access method and are not
  768.    represented as Gopher URLs.
  769.    
  770.   TELNET, RLOGIN, TN3270
  771.   
  772.    The use of URLs to represent interactive sessions is a convenient
  773.    extension to their uses for objects.  This allows access to
  774.    information systems which only provide an interactive service, and
  775.    no information server. As information within the service cannot be
  776.    addressed individually or, in general, automatically retrieved,
  777.    this is a less desirable, though currently common, solution.
  778.    
  779.   X500
  780.   
  781.    The mapping of x500 names onto URLs is not defined here. A decision
  782.    is required as to whether "distinguished names" or "user friendly
  783.    names" (ufn), or both, should be allowed. If any punctuation
  784.    conversions are needed from the adopted x500 representation (such
  785.    as the use of slashes between parts of a ufn) they must be defined.
  786.    This is a subject for study.
  787.    
  788.   WHOIS
  789.   
  790.    This prefix describes the access using the "whois++" scheme in the
  791.    process of definition. The hostname part is the same as for other
  792.    IP based schemes. The path part can be either a whois handle for a
  793.    whosi object, or it can be a valid whois query string. This is a
  794.    subject for further study.
  795.    
  796.   NETWORK MANAGEMENT DATABASE
  797.   
  798.    This is a subject for study.
  799.    
  800.   REGISTRATION OF NAMING SCHEMES
  801.   
  802.    A new naming scheme may be introduced by defining a mapping onto a
  803.    conforming URL syntax, using a new scheme identifier. Experimental
  804.    scheme identifiers may be used by mutual agreement between parties,
  805.    and must start with the characters "x-".  The scheme name "urn:" is
  806.    reserved for the work in progress on a scheme for more persistent
  807.    names.  Therefore URNs (Names) and URLs (Locators)  be
  808.  
  809.  
  810.  
  811. Berners-Lee                                                          14
  812.  
  813.    distinguishable. An object which is either a URL or a URN is known
  814.    as a URI (Identifier).
  815.    
  816.    It is proposed that the Internet Assigned Numbers Authority (IANA)
  817.    perform the function of registration of new schemes. Any submission
  818.    of a new URI scheme must include a definition of an algorithm for
  819.    the retrieval of any object within that scheme. The algorithm must
  820.    take  the URI and produce either a set of URL(s) which will lead to
  821.    the desired object, or the object itself, in a well-defined or
  822.    determinable format.
  823.    
  824.    It is recommended that those proposing a new scheme demonstrate its
  825.    utility and operability by the provision of a gateway which will
  826.    provide images of objects in the new scheme for clients using an
  827.    existing protocol. If the new scheme is not a locator scheme, then
  828.    the properties of names in the new space should be clearly defined.
  829.     It is likewise recommended that, where a protocol allows for
  830.    retrieval by URI, that the client software have provision for being
  831.    configured to use specific gateway locators for indirect access
  832.    through new naming schemes.
  833.    
  834. BNF syntax
  835.  
  836.    This is a BNF-like description of the Uniform Resource Locator
  837.    syntax. A vertical  line "|"  indicates alternatives, and
  838.    [brackets]  indicate optional parts.  Spaces are representated by
  839.    the word "space", and the vertical line character by "vline".
  840.    Single letters stand for single letters. All words of more than one
  841.    letter below are entities described somewhere in this description.
  842.    
  843.    The "generic" production gives a higher level parsing of the same
  844.    URLs as the other productions.  The "national" and "punctuation"
  845.    characters fo not appear in any productions and therefore may not
  846.    appear in URLs.
  847.    
  848.    The "afsaddress" is left in as historical note, but is not a url
  849.    production
  850.    
  851.   fragmentaddress         uri [ # fragmentid ]
  852.                          
  853.   uri                     url
  854.                          
  855.   url                    generic | httpaddress | ftpaddress |
  856.                          newsaddress | prosperoaddress | telnetaddress
  857.                           | gopheraddress | waisaddress
  858.                          
  859.   generic                 scheme :  path [ ? search ]
  860.                          
  861.   scheme                  ialpha
  862.                          
  863.   httpaddress             h t t p :   / / hostport [  / path ] [ ?
  864.                          search ]
  865.                          
  866.  
  867.  
  868.  
  869. Berners-Lee                                                          15
  870.  
  871.   ftpaddress              f t p : / / login / path
  872.                          
  873.   afsaddress              a f s : / / cellname / path
  874.                          
  875.   newsaddress             n e w s : groupart
  876.                          
  877.   waisaddress             waisindex | waisdoc
  878.                          
  879.   waisindex               w a i s : / / hostport / database [ ? search
  880.                          ]
  881.                          
  882.   waisdoc                 w a i s : / / hostport / database / wtype /
  883.                          digits / path
  884.                          
  885.   groupart                * | group | article
  886.                          
  887.   group                   ialpha [ . group ]
  888.                          
  889.   article                 xalphas @ host
  890.                          
  891.   database                xalphas
  892.                          
  893.   wtype                   xalphas
  894.                          
  895.   prosperoaddress         prosperolink
  896.                          
  897.   prosperolink            p r o s p e r o : / / hostport / hsoname [ %
  898.                           0 0 version [ attributes ] ]
  899.                          
  900.   hsoname                 path
  901.                          
  902.   version                 digits
  903.                          
  904.   attributes              attribute [ attributes ]
  905.                          
  906.   attribute               alphanums
  907.                          
  908.   telnetaddress           t e l n e t : / / login
  909.                          
  910.   gopheraddress           g o p h e r : / / hostport [/ gtype  [
  911.                          selector ] ] [ ? search ]
  912.                          
  913.   login                   [ user [ : password ] @ ] hostport
  914.                          
  915.   hostport                host [ : port ]
  916.                          
  917.   host                    hostname | hostnumber
  918.                          
  919.   cellname                hostname
  920.                          
  921.   hostname                ialpha [  .  hostname ]
  922.                          
  923.   hostnumber              digits . digits . digits . digits
  924.  
  925.  
  926.  
  927. Berners-Lee                                                          16
  928.  
  929.   port                    digits
  930.                          
  931.   selector                path
  932.                          
  933.   path                    void |  xpalphas  [  / path ]
  934.                          
  935.   search                  xalphas [ + search ]
  936.                          
  937.   user                    xalphas
  938.                          
  939.   password                xalphas
  940.                          
  941.   fragmentid              xalphas
  942.                          
  943.   gtype                   xalpha
  944.                          
  945.   xalpha                  alpha | digit | safe | extra | escape
  946.                          
  947.   xalphas                 xalpha [ xalphas ]
  948.                          
  949.   xpalpha                 xalpha | +
  950.                          
  951.   xpalphas                xpalpha [ xpalpha ]
  952.                          
  953.   ialpha                  alpha [ xalphas ]
  954.                          
  955.   alpha                   a | b | c | d | e | f | g | h | i | j | k |
  956.                          l | m | n | o  | p | q | r | s | t | u | v |
  957.                          w | x | y | z | A | B | C  | D | E | F | G |
  958.                          H | I | J | K | L | M | N | O | P |  Q | R |
  959.                          S | T | U | V | W | X | Y | Z
  960.                          
  961.   digit                   0 |1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
  962.                          
  963.   safe                    $ | - | _ | @ | . | &
  964.                          
  965.   extra                   ! | * | " |  ' | ( | ) | : | ; | , | space
  966.                          
  967.   escape                  % hex hex
  968.                          
  969.   hex                     digit | a | b | c | d | e | f | A | B | C |
  970.                          D | E | F
  971.                          
  972.   national                { | } | vline | [ | ] | \ | ^ | ~
  973.                          
  974.   punctuation             < | >
  975.                          
  976.   digits                  digit [ digits ]
  977.                          
  978.   alphanum                alpha | digit
  979.                          
  980.   alphanums               alphanum [ alphanums ]
  981.                          
  982.  
  983.  
  984.  
  985. Berners-Lee                                                          17
  986.  
  987.   void
  988.                          
  989. Wrappers for URIs in plain text
  990.  
  991.    This section does not formally form part of the URL specification.
  992.    
  993.    URIs, including URLs, will ideally be transmitted though protocols
  994.    which accept them and data formats which define a context for them.
  995.     However, in practice nowadays there are many occasions when URLs
  996.    are included in plain ASCII non-marked-up text such as electronic
  997.    mail and usenet news messages.
  998.    
  999.    In this case, it is convenient to have a separate wrapper syntax to
  1000.    define delimiters which will enable the human or automated reader
  1001.    to recognize that the URI is a URI.
  1002.    
  1003.    The recommendation is that the angle brackets (less than and
  1004.    greater than signs) of the ASCII set be used for this purpose.
  1005.    
  1006.    These wrappers do not form part of the URL, are not mandatory, and
  1007.    should not be used in contexts (such as SGML parameters, HTTP
  1008.    requests, etc) in which delimiters are already specified.
  1009.    
  1010.     Example
  1011.     
  1012.                 Yes, Jim, I found it under <ftp://info.cern.ch/pub> bu
  1013. t
  1014.                 you can probably pick it up from <ftp://ds.internic.ne
  1015. t/rfc>.
  1016.  
  1017.  
  1018. Security considerations
  1019.  
  1020.    The URL scheme does not in itself pose a security threat. Users
  1021.    should beware that there is no general guarantee that a URL which
  1022.    at one time points to a given object continues to do so, and does
  1023.    not even at some later time point to a different object due to the
  1024.    movement of objects on servers.
  1025.    
  1026.    The use of URLs containing passwords is clearly unwise.
  1027.    
  1028. Conclusion
  1029.  
  1030.    A need has been demonstrated, and a number of requirements have
  1031.    been stated for uniform resource locators (URLs). A scheme has been
  1032.    proposed which builds on existing conventions to define a syntax
  1033.    for URLs.  This scheme has been in serious use by World-Wide Web
  1034.    (W3) initiative since 1991.  Adoption of the scheme in
  1035.    correspondence, standards and software will ease the use of
  1036.    references to on-line information in a flexible way as the coming
  1037.    information age arrives.
  1038.    
  1039. Acknowledgements
  1040.  
  1041.  
  1042.  
  1043. Berners-Lee                                                          18
  1044.  
  1045.    This paper builds on the basic W3 design and much discussion of
  1046.    these issues by many people on the network. The discussion was
  1047.    particularly stimulated by articles by Clifford Lynch (1991),
  1048.    Brewster Kahle (1991) and Wengyik Yeong (1991b). Contributions from
  1049.    John Curran (NEARnet), Clifford Neuman (ISI) Ed Vielmetti (MSEN)
  1050.    and later the IETF URL BOF and URI working group have been
  1051.    incorporated into this issue of this paper.
  1052.    
  1053.    The draft url4  (Internet Draft 00) was generated from url3
  1054.    following discussion and overall approval of the URL working group
  1055.    on 29 March 1993. The paper url3 had been generated from udi2 in
  1056.    the light of discussion at the UDI BOF meeting at the Boston IETF
  1057.    in July 1992. Draft url4 was Internet Draft 00. Draft url5
  1058.    incorporated changes suggested by Clifford Neuman, and draft url6
  1059.    (ID 01) incorporated character group changes and a few other fixes
  1060.    defined by the IETF URI WG in submitting it as a proposed standard.
  1061.     URL7 (Internet Draft 02) incorporated changes introduced at the
  1062.    Amsterdam IETF and refined in net discussion.
  1063.    
  1064. References
  1065.  
  1066.   Alberti, R., et.al.  (1991)
  1067.                           "Notes on the Internet Gopher  Protocol"
  1068.                          University of Minnesota, December 1991,
  1069.                          <ftp://boombox.micro.umn.edu/pub/gopher/
  1070.                          gopher_protocol>. See also
  1071.                          <gopher://gopher.micro.umn.edu/00/Information
  1072.                          About Gopher/About Gopher>
  1073.                          
  1074.   Berners-Lee, T ., (1991)
  1075.                           "Hypertext Transfer Protocol (HTTP)", CERN,
  1076.                          December 1991,
  1077.                          <ftp://info.cer
  1078.                          n.ch/pub/www/doc/http-spec.txt>
  1079.                          
  1080.   Davis, F, et  al., (1990)
  1081.                           "WAIS Interface Protocol: Prototype
  1082.                          Functional Specification", Thinking Machines
  1083.                          Corporation,  April 23, 1990
  1084.                          <ftp://quake.think.com/pub/wa
  1085.                          is/doc/protspec.txt>
  1086.                          
  1087.   International Standards Organization, (1991)
  1088.                           Information and  Documentation - Search and
  1089.                          Retrieve Application Protocol  Specification
  1090.                          for open Systems Interconnection, ISO-10163
  1091.                          
  1092.   Huitema, C., (1991)     "Naming: strategies and techniques",
  1093.                          Computer Networks and ISDN Systems 23 (1991)
  1094.                          107-110.
  1095.                          
  1096.   Kahle, Brewster, (1991)
  1097.                          "Document Identifiers,  or  International
  1098.  
  1099.  
  1100.  
  1101. Berners-Lee                                                          19
  1102.  
  1103.                          Standard Book Numbers for the Electronic
  1104.                          Age",
  1105.                          <ftp:
  1106.                          //quake.think.com/pub/wais/doc/doc-ids.txt>
  1107.                          
  1108.   Kantor, B., and Lapsley, P., (1986)
  1109.                          "A proposed standard for  the stream-based
  1110.                          transmission of news", Internet RFC-977,
  1111.                          February 1986.
  1112.                          <ftp://ds.internic.net/rfc/rfc977.txt>
  1113.                          
  1114.   Lynch, C., Coallition for Networked Information: (1991)
  1115.                          "Workshop on ID and Reference Structures for
  1116.                          Networked Information", November 1991. See
  1117.                          <wais://quake.think.com/wais-discussion-ar
  1118.                          chives?lynch>
  1119.                          
  1120.   Mockapetris, P., (1987)
  1121.                           "Domain names + concepts and  facilities",
  1122.                          RFC-1034, USC-ISI, November 1987,
  1123.                          <ftp://ds.internic.net/rfc/rfc1034.txt>
  1124.                          
  1125.   Neuman, B. Clifford, (1992)
  1126.                           "Prospero: A Tool for Organizing  Internet
  1127.                          Resources", Electronic Networking: Research,
  1128.                          Applications and Policy, Vol 1 No 2, Meckler
  1129.                          Westport CT  USA.  See also
  1130.                          <ftp://prospero.isi.edu/pub/prospero/oir.ps>
  1131.                          
  1132.   Postel, J. and Reynolds, J. (1985)
  1133.                          "File Transfer Protocol  (FTP)", Internet
  1134.                          RFC-959, October 1985.
  1135.                          <ftp://ds.internic.net/rfc/rfc959.txt>
  1136.                          
  1137.   Yeong, W., (1991a)      "Towards Networked Information Retrieval",
  1138.                          Technical report 91-06-25-01, June 1991,
  1139.                          Performance Systems International, Inc.
  1140.                          <ftp://uu.psi.com/wp/nir.txt>
  1141.                          
  1142.   Yeong, W., (1991b),     "Representing Public Archives in the
  1143.                          Directory", Internet Draft, November 1991,
  1144.                          now expired.
  1145.                          
  1146.   AUTHOR'S ADDRESS
  1147.   
  1148.  
  1149.                            Tim Berners-Lee
  1150.                 Address:   World-Wide Web project
  1151.                            CERN,
  1152.                            1211 Geneva 23,
  1153.                            Switzerland
  1154.  
  1155.                 Telephone: +41 (22)767 3755
  1156.  
  1157.  
  1158.  
  1159. Berners-Lee                                                          20
  1160.  
  1161.                 Fax:       +41 (22)767 7155
  1162.                 Email:     timbl@info.cern.ch
  1163.  
  1164.  
  1165.    
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218. Berners-Lee                                                          21
  1219.  
  1220.